<!--
 * @Description: 
 * @version: 
 * @Author: liurui
 * @Date: 2024-02-04 14:17:04
 * @LastEditors: 
 * @LastEditTime: 2024-02-04 15:22:50
-->
<template>
    <div>

    </div>
</template>

<script setup lang="ts">
// 实现 TrimLeft<T> ，
// 它接收确定的字符串类型并返回一个新的字符串，
// 其中新返回的字符串删除了原字符串开头的空白字符串


type TrimLeft<S extends string> = S extends ` ${infer Rest}` ? TrimLeft<Rest> : S;

type res = TrimLeft<"   Hello World">;  // expected to be "Hello World"

</script>

<style scoped>

</style>